<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/pages/common/taglib.jsp"%>
<%@page import="com.gfa4j.resource.ResourceManagerServer"%>
<%@page import="com.wef.common.util.CommonMessageDomain"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
		<%@include file="/styles/css_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/css_lib.jsp"%>
		<%@include file="/scripts/widgets/jqgrid/css_lib.jsp"%>
		<link rel="stylesheet" type="text/css" href="${ctx}/pages/demo/demo.css" />				
		<%@include file="/pages/common/js_global.jsp"%>
		<%@include file="/scripts/sdk/js_lib.jsp"%>
		<%@include file="/scripts/config/js_lib.jsp" %>
		<%@include file="/scripts/utils/js_lib.jsp"%>
		<%@include file="/scripts/i18n/js_lib.jsp"%>
		<%@include file="/scripts/format/js_lib.jsp"%>
		<%@include file="/scripts/validate/js_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/js_lib.jsp"%>
		<%@include file="/scripts/widgets/jqgrid/js_lib.jsp"%>
		<%@include file="/scripts/widgets/page-custom/js_lib.jsp"%>
		<%@include file="/scripts/widgets/datePicker/js_lib.jsp"%>
		<script type="text/javascript" src="${ctx}/pages/demo/demo.js"></script>
		<script type="text/javascript" src="${ctx}/pages/demo/components/string_util.js"></script>		
</head>

<body class="body">
<div id="Content_Show">
	<div class="Desc">
		功能:输入值首字母大小写转换,如下: (<a href="#" id="aDiv1">首字母转大写源码</a>)&nbsp;(<a href="#" id="aDiv2">首字母转小写源码</a>)
	</div>
	<div id="div1" style="display: none;">
		var val = $('#editMessageCase').val();</br>
		var str = $.StringUtils.firstLowerCase(val);</br>
		$('#editMessageCase').val(str);
	</div>
	<div id="div2" style="display: none;">
		var str = $('#editMessageCase').val();</br>
		str = $.StringUtils.firstUpperCase(str);</br>					
		$('#editMessageCase').val(str);
	</div>
	<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
		<ul id="editMsgCase" allowChange="true" class="edit_box">	
			<li>
				<k:label text="demo.Stringutils.message"/>
				<k:text styleId="editMessageCase" styleClass="text" property="messageCase"/>
			</li>
	</div>
	<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
		<ul class="button_box">
			<li>
				<k:button styleId="firstToLower" text="demo.Stringutils.firstToLower" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
			</li>
			<li>
				<k:button styleId="firstToUpper" text="demo.Stringutils.firstToUpper" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
			</li>
		</ul>
	</div>
	<div class="Desc">
		功能:判断输入值是否为空,如下: (<a href="#" id="aDiv3">验证输入不为空源码</a>)
	</div>
	<div id="div3" style="display: none;">
		var str = $('#editMessageEmpty').val();</br>
		str = $.StringUtils.isEmpty(str);</br>
		if(str==true)</br>
		alert("message can't be empty");	
	</div>
	<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
		<ul id="editMsgEmpty" allowChange="true" class="edit_box">	
			<li>
				<k:label text="demo.Stringutils.message"/>
				<k:text styleId="editMessageEmpty" styleClass="text" property="messageEmpty"/>
			</li>
	</div>
	<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
		<ul class="button_box">
			<li>
				<k:button styleId="messageIsEmpty" text="demo.Stringutils.messageIsEmpty" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
			</li>
		</ul>
	</div>
	<div class="Desc">
		功能:去除输入值空格,如下: (<a href="#" id="aDiv4">去除前空格源码</a>)&nbsp;(<a href="#" id="aDiv5">去除后空格源码</a>)&nbsp;(<a href="#" id="aDiv6">去除中间空格源码</a>)
	</div>
	<div id="div4" style="display: none;">
		var str = $('#editMessageTrim').val();</br>
		str = $.StringUtils.leftTrim(str);</br>					
		$('#editMessageTrim').val(str);	
	</div>
	<div id="div5" style="display: none;">
		var str = $('#editMessageTrim').val();</br>
		str = $.StringUtils.rightTrim(str);</br>					
		$('#editMessageTrim').val(str);		
	</div>
	<div id="div6" style="display: none;">
		var str = $('#editMessageTrim').val();</br>
		str = $.StringUtils.allTrim(str);</br>					
		$('#editMessageTrim').val(str);	
	</div>
	<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
		<ul id="editMsgTrim" allowChange="true" class="edit_box">	
			<li>
				<k:label text="demo.Stringutils.message"/>
				<k:text styleId="editMessageTrim" styleClass="text" property="messageTrim"/>
			</li>
	</div>
	<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
		<ul class="button_box">
			<li>
				<k:button styleId="messageLeftTrim" text="demo.Stringutils.messageLeftTrim" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
			</li>
			<li>
				<k:button styleId="messageRightTrim" text="demo.Stringutils.messageRightTrim" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
			</li>
			<li>
				<k:button styleId="messageAllTrim" text="demo.Stringutils.messageAllTrim" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
			</li>
		</ul>
	</div>
</div>
</body>
</html>